<?php

namespace App\Http\Controllers\Wechat;

use App\Business\BLL\Wechat\Official;
use App\Http\Controllers\Controller;

class MenuController extends Controller
{
    public function create()
    {
        $official = Official::make();

        $buttons = [
            [
                "type" => "miniprogram",
                "name" => "乒乓江湖",
                "url" => "http://mp.weixin.qq.com",
                "appid" => config('wechat.mini_program.default.app_id'),
                "pagepath" => "pages/index",
            ],
            [
                "name" => "江湖直播",
                "sub_button" => [
                    [
                        "type" => "view",
                        "name" => "正在直播",
                        "url" => "https://wx.vzan.com/live/tvchat-1697445282?jumpitd=1&fr=&sharetstamp=1592016863960&shareuid=1255943",
                    ],
                    [
                        "type" => "view",
                        "name" => "往期直播",
                        "url" => "https://wx.vzan.com/live/tvchat-400389642?ver=637236184282132513&shareuid=1255963&vprid=0&from=singlemessage&isappinstalled=0",
                    ],
                ],
            ],
        ];
        $official->menu->create($buttons);

    }
}
